package vn.com.demand.lux.view.contentprovider;

import java.util.List;

import org.eclipse.jface.viewers.IContentProvider;
import org.eclipse.jface.viewers.IStructuredContentProvider;
import org.eclipse.jface.viewers.Viewer;

import vn.com.demand.lux.model.UpdateIssuingExpenseBean;

/**
 * 
 * @author Huynh Tan Tai <httcntt@yahoo.com>
 *
 */
public class UpdateIssuingExpenseContentProvider implements IContentProvider,
		IStructuredContentProvider {

	public void dispose() {
		// TODO Auto-generated method stub

	}

	public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
		// TODO Auto-generated method stub

	}

	@SuppressWarnings("unchecked")
	public Object[] getElements(Object inputElement) {
		if (inputElement instanceof List) {
			List<UpdateIssuingExpenseBean> list = (List<UpdateIssuingExpenseBean>) inputElement;
			return list.toArray(new UpdateIssuingExpenseBean[0]);
		}
		return null;
	}

}
